package cn.sccl.dirms.dev.model;

import cn.sccl.common.exception.BusinessException;
import cn.sccl.common.model.BaseModel;

/**
* 
* 数据库表 t_dev_data_key 的实体对象
* Created by liupan on 2017-06-25.
*/
public class DataKey extends BaseModel{
/**
*表名
*/
public final static String TABLE_NAME ="t_dev_data_key";

    private java.lang.String dsId;//数据源id
    private java.lang.String keyName;//键名称
    private java.lang.String ketType;//键类型
    private java.lang.String format;//格式
    private java.lang.String remark;//备注

    public void setDsId(java.lang.String dsId){
    this.dsId = dsId;
    }

        public java.lang.String getDsId(){
    return this.dsId;
    }
    public void setKeyName(java.lang.String keyName){
    this.keyName = keyName;
    }

        public java.lang.String getKeyName(){
    return this.keyName;
    }
    public void setKetType(java.lang.String ketType){
    this.ketType = ketType;
    }

        public java.lang.String getKetType(){
    return this.ketType;
    }
    public void setFormat(java.lang.String format){
    this.format = format;
    }

        public java.lang.String getFormat(){
    return this.format;
    }
    public void setRemark(java.lang.String remark){
    this.remark = remark;
    }

        public java.lang.String getRemark(){
    return this.remark;
    }

/**
* clone一个对象。
* @param cls 需要克隆的对象类型，只能是当前类的子类
* @param
<T>
    * @return
    * @throws IllegalAccessException
    * @throws InstantiationException
    */
    public
    <T extends DataKey> T clone(Class
        <T> cls) {
            try {
            T t = cls.newInstance();
            t.setId(this.
            getId());
            t.setDsId(this.
            getDsId());
            t.setKeyName(this.
            getKeyName());
            t.setKetType(this.
            getKetType());
            t.setFormat(this.
            getFormat());
            t.setRemark(this.
            getRemark());
            t.setCreateTime(this.
            getCreateTime());
            t.setUpdateTime(this.
            getUpdateTime());
            t.setDeleteFlag(this.
            isDeleteFlag());
            return t;
            } catch (Exception e) {
            e.printStackTrace();
            throw new BusinessException("对象克隆失败，请克隆的目标对象是否具有无参的构造函数。", e.getCause());
            }
            }
            }